1. Field of Invention
This invention relates to rotating image data in an opponent color space.
2. Description of Related Art
In color image processing machines, such as digital copiers, scanners and the like, it is often desirable to provide an image rotation function to rotate a scanned image to various orientations, such as a 90xc2x0-, 180xc2x0-, and 270xc2x0-rotated position with respect to an orientation of the original image. Typically, such image rotation is performed in the red-green-blue (RGB) color space or the cyan-yellow-magenta-black (CYMK) color space, and is performed in software.
Rotating RGB or CYMK data entails rotating separate planes of color space. This is relatively slow, and does not allow real-time rotation. It would be advantageous to rotate images in an opponent color space in dedicated hardware. xe2x80x9cOpponent color spacexe2x80x9d refers to any color space in which a luminance or gray intensity value is specified for each pixel, and in which a chrominance or color property value is also specified for each pixel. Examples of opponent color spaces include the Y CB CR color space, which is used, for example, in JPEG implementations, and the L*a*b* color space. In the Y CB CR color space, the xe2x80x9cYxe2x80x9d value specifies the luminance or gray intensity value, and the the xe2x80x9cCBxe2x80x9d and xe2x80x9cCRxe2x80x9d values specify the chrominance or color properties. In the L*a*b* color space, the xe2x80x9cL*xe2x80x9d value specifies the luminance, and the xe2x80x9ca*xe2x80x9d and xe2x80x9cb*xe2x80x9d values specify the chrominance.
However, in many Direct Memory Access (DMA)-based systems, writing the entire opponent color space data to a page buffer of each of the opponent color space data components requires a three-byte operation that may cross over a 32-bit word boundary. In other words, many DMA systems operate on boundaries that require a minimum of two address writes per pixel. Furthermore, since rotation requires random addressing into memory, or in other words, since contiguous input pixel data cannot be written to corresponding contiguous addresses in memory, conventional speed-enhancing procedures such as memory bursting cannot be used. Therefore, rotation requires a relatively long time.
Subsampling can be used to create pixel data that fits within the system boundaries such that a plurality of pixels may be grouped and rotated as one unit. This allows DMA controllers to operate more efficiently. However, pixel grouping distorts or elongates an image during 90xc2x0 and 270xc2x0 rotation. This distortion will be described in detail below.
This invention provides systems and methods for rotating opponent color space data in hardware without distortion. In one exemplary embodiment, the systems and methods according to this invention rotate opponent color space image data, and, when a specified rotation angle is non-zero and non-180xc2x0, for example, when the specified rotation angle is 90xc2x0 or 270xc2x0, scale and subsample input opponent color space image data and address the scaled and subsampled data into an output configuration corresponding to the specified rotation angle.
In another exemplary embodiment, the systems and methods according to this invention rotate opponent color space image data by a specified rotation angle, and include a scaler that scales the opponent color space image data, a subsampler that subsamples the opponent color space image data, and an addresser that addresses the opponent color space image data into an output configuration corresponding to the specified rotation angle. If necessary, exemplary systems and methods of this invention may also include a resolution converter to resolution convert the rotated data, and/or a tag rotator that rotates tags that are associated with the opponent color space image data into a configuration corresponding to the output configuration of the opponent color space image data.
Rotating the image data in the opponent color space using hardware allows the rotation to be performed in real time.
These and other features and advantages of this invention are described in or are apparent from the following description of various exemplary embodiments.